//表格配置json
import { TableOption } from "@/components/SuperTable/tableType";

// 局部过滤器
const getFunctionStoresNum = (state: any) => {
  return Number(state) === -1 ? 0 : state;
};
// 作业点
export const tableConfig: TableOption = {
  // 表格配置
  propList: [
    { prop: "station_name", slotName: "station_name", label: "作业点名称/标识符", minWidth: "100", align: "left" },
    { prop: "map_name", label: "地图名称", minWidth: "100", align: "left" },
    { prop: "node_name_cn", label: "地图点位", minWidth: "100", align: "left" },
    { prop: "station_status", slotName: "station_status", label: "作业点状态", minWidth: "100", align: "left" },
    { prop: "group_name", label: "所属组", minWidth: "100", align: "left" },
    { prop: "stationFunctionTypes", slotName: "stationFunctionTypes", label: "能力", minWidth: "100", align: "left" },
    { prop: "feeding", slotName: "feeding", label: "关联触发条件", minWidth: "100", align: "left" },
    { prop: "charging", slotName: "charging", label: "关联动作序列", minWidth: "100", align: "left" },
    { prop: "", label: "关联流程数", minWidth: "100", align: "left" },
    { prop: "group_na", label: "存储物料", minWidth: "100", align: "left" },
    { prop: "stores_num", filter: getFunctionStoresNum, label: "物料库存数", minWidth: "100", align: "left" },
    { prop: "group_heigt", label: "离地面高度(mm)", minWidth: "100", align: "left" },
    { prop: "sys_ctime", label: "更新时间", minWidth: "100", align: "left" },
    { prop: "updater", label: "更新人", minWidth: "100", align: "left" },
    {
      label: "操作",
      width: "100",
      slotName: "handler",
      fixed: "right",
      align: "right",
    },
  ],
  // 表格具有序号列
  showIndexColumn: true,
  // 表格具有可选列
  showSelectColumn: true,
  //是否显示分页
  showPagination: true,
  // 是否显示溢出隐藏
  showOverflowTooltip: false,
};
